package com.summer.order.model;

import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name="cookbook")
public class Cookbook implements java.io.Serializable{

	

	private static final long serialVersionUID = -5629915787806571550L;

	private String id;
	
	private String dateBetween;
	
	private Date startDate;
	private Date endDate;
	
	private Integer status;
	
	private Integer cookbookDayCount = 1;
	
	private Set<DayFood> dayFoods;
	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return id;
	}
	
	@Column(name = "date_between")
	public String getDateBetween() {
		return dateBetween;
	}
	
	@OneToMany(cascade=CascadeType.ALL,mappedBy="cookbook",fetch=FetchType.LAZY)
	public Set<DayFood> getDayFoods() {
		return dayFoods;
	}
	
	@Column(name = "start_date")
	public Date getStartDate() {
		return startDate;
	}
	
	@Column(name = "end_date")
	public Date getEndDate() {
		return endDate;
	}
	
	public Integer getStatus() {
		return this.status;
	}

	public Integer getCookbookDayCount() {
		return this.cookbookDayCount;
	}
	
	public void setId(String id) {
		this.id = id;
	}

	public void setDateBetween(String dateBetween) {
		this.dateBetween = dateBetween;
	}

	public void setDayFoods(Set<DayFood> dayFoods) {
		this.dayFoods = dayFoods;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	public void setCookbookDayCount(Integer cookbookDayCount) {
		this.cookbookDayCount = cookbookDayCount;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	
	
	
	
	
	
}
